<template>
  <div>我是首页</div>
  <div>count:{{ count }}</div>
  <div>double:{{ double }}</div>
  <div>
    <n-button type="primary" @click="increment()"> 增加 </n-button>
  </div>
</template>
<script setup lang="ts">
import test from "@/stores/test";
import { storeToRefs } from "pinia";
// import { login } from "@/api/test";
import { getData } from "@/api/test";
const store = test();
const { count, double } = storeToRefs(store);
const { increment } = store;
// 请求调用测试数据
getData()
  .then((res) => {
    console.log(res);
  })
  .catch((err) => {
    console.log("error", err);
  });
/* login().then((res) => {
  console.log(res);
  // priceList();
}); */
</script>
<style lang=""></style>
